<!DOCTYPE html>
<html lang="en">
  
  <head>
    <meta charset="utf-8">
    <!-- YUI CSS -->
    <link rel="stylesheet" type="text/css" href="css/tabview.css" />
    <link rel="stylesheet" type="text/css" href="css/autocomplete.css">
    <link rel="stylesheet" type="text/css" href="css/fonts.css">
    <!-- CHROME EXT CSS -->
    <link rel="stylesheet" type="text/css" href="css/itabview.css" />
    <link rel="stylesheet" type="text/css" href="css/statusConsole.css" />
    <link rel="stylesheet" type="text/css" href="css/popup.css" />
    <!-- YUI JS -->
    <script type="text/javascript" src="js/yahoo-dom-event.js">
    </script>
    <script type="text/javascript" src="js/element.js">
    </script>
    <script type="text/javascript" src="js/tabview.js">
    </script>
    <script type="text/javascript" src="js/datasource.js">
    </script>
    <script type="text/javascript" src="js/autocomplete.js">
    </script>
    <!-- CHROME EXT JS -->
    <script type="text/javascript" src="js/imo.js">
    </script>
    <script type="text/javascript" src="js/constants.js">
    </script>
    <script type="text/javascript" src="js/utils.js">
    </script>
    <script type="text/javascript" src="js/utils2.js">
    </script>
    <script type="text/javascript" src="js/convPanel.js">
    </script>
    <script type="text/javascript" src="js/convViewManager.js">
    </script>
    <script type="text/javascript" src="js/statusConsole.js">
    </script>
    <script type="text/javascript" src="js/blistSearcher.js">
    </script>
    <script type="text/javascript" src="js/popupActivity.js">
    </script>
    <script type="text/javascript" src="js/viewManager.js">
    </script>
    <script>
      /* This is a hack. The front end cannot subscribe directly to the events
generated on the backend. So, we have global events and the backend fires them and the rest of the front end subscribes to these
*/
      var gPopupEvent = new YAHOO.util.CustomEvent('popup_event');

      function getBackgroundPage() {
        var views = chrome.extension.getViews();
        for (var i = 0; i < views.length; i++) {
          var view = views[i];
          if (view.location.href == chrome.extension.getURL('background.html')) {
            return view;
          }
        }
        return null;
      }

      var bg = getBackgroundPage();
      var _ = bg._;

      function init() {
        var vm = new IMO.Manager.ViewManager(document.body);
      }
    </script>
  </head>
  
  <body onload="init()" class="yui-skin-sam body">
  </body>

</html>